With growing operation capacity of high-speed processing chips, it is more and more popular to implement function parts of a communication system by digital means. Due to change of the transmission path or other factors, the signal strength in the transmission process fluctuates sharply. Therefore, it is necessary to adjust the amplitude of signals on the receiver, namely, reduce the gain of the signals when the input signals are strong, or enhance the gain of the signals when the signals are weak. The gain control methods include Automatic Gain Control (AGC) and Manual Gain Control (MGC). Currently, the AGC is generally applied, which enables the receiver to adapt to the change of the input signals automatically and ensures normal work of the communication system.
In a voice processing system, the AGC algorithm is one of three commonly used audio preprocessing methods. The AGC keeps steady volume of voice, and prevents too small or too large volume caused by dynamic change of the voice and the model of the microphone. The AGC prevents the sound of a large volume from being distorted, and prevents the sound of a small volume from attenuating excessively.
In the automatic gain control on the voice signals, if two audio channels are in use, the data on the two audio channels is combined into one-channel data and input to the AGC unit, and the gain is calculated out and applied to the data on the two audio channels. The AGC algorithm processing uses the correlation state of the signals of the previous frame, and the correlation state is buffered for a certain time before being output. Therefore, different audio channels cannot be processed by the same AGC unit.
In an AGC method for processing multiple audio channels in the prior art, multiple audio channels are processed by their respective AGC units. For example, as shown in FIG. 1, the multi-audio channel system uses multiple AGC units corresponding to multiple audio channels to process data respectively.
When different audio channels collect the sound from the same source, the AGC unit of each channel processes the data respectively. Some audio channels may amplify the sound, and other audio channels may attenuate the sound, which damages the perception of the sound locations and orientation sense of the original sound and loses the effect of the original stereo sound.
In another solution provided in the prior art, multiple audio channels are processed by the same AGC unit. As shown in FIG. 2, the mean value of amplitudes of multiple audio channels is input into the AGC unit, the gain of this frame of data is calculated out, and all audio channels are amplified uniformly.
This solution is practicable when multiple audio channels transmit the sound from the same source, but is defective when the audio channels transmit the sound from different sources. When the audio channels transmit the sound from different sources, the average amplitude value of all audio channels is input to the AGC unit, and the amplitude is controlled for all audio channels uniformly. Consequently, the sound that should be amplified is attenuated, and the sound that should be attenuated is amplified. In this way, after the signals on all audio channels are processed, the effect of the signals is deteriorated, and even the signals on some audio channels are distorted.